﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Management;
using Atom.Utility;

namespace MontiorReport
{
    public partial class FrmRegist : Form
    {
        public FrmRegist()
        {
            InitializeComponent();
        }

        private void btnGenerateNo_Click(object sender, EventArgs e)
        {
            textEdit1.Text = EncryptDecrypt.GetCpuID();
            textEdit2.Text = EncryptDecrypt.GetMacInfo();

        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (textEdit3.Text.Trim().Equals(string.Empty))
            {
                MessageBox.Show("请输入医院名称！");
                return;
            }
            SaveFileDialog sfd = new SaveFileDialog();
            sfd.FileName = "Medlicense.ini";
            if (sfd.ShowDialog() == DialogResult.OK)
            {

                FileManage.SaveFile(sfd.FileName, textEdit3.Text + "|" + textEdit2.Text + "|" + textEdit1.Text + "|");

            }
        }




    }
}
